package uestc.lj.gulishop.cart.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import uestc.lj.gulishop.cart.interceptor.CartInterceptor;

/**
 * @Author:Crazlee
 * @Date:2021/6/11
 */
@Configuration
public class GuliShopCartConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new CartInterceptor()).addPathPatterns("/**");
    }
}
